//
//  EWEDataPlayer.h
//  Auscultation
//
//  Created by 来 on 2020/12/6.
//

#import <Foundation/Foundation.h>
#import <AudioToolbox/AudioToolbox.h>

#define QUEUE_BUFFER_SIZE 6 //队列缓冲个数
#define MIN_SIZE_PER_FRAME 400 //每帧最小数据长度

@interface EWEDataPlayer : NSObject {
    AudioStreamBasicDescription audioDescription; ///音频参数
    AudioQueueRef audioQueue; //音频播放队列
    AudioQueueBufferRef audioQueueBuffers[QUEUE_BUFFER_SIZE]; //音频缓存
    BOOL audioQueueUsed[QUEUE_BUFFER_SIZE];
    BOOL isPlay;
    NSLock *synlock;
}

- (void)stop;
- (void)pause;
- (void)start;
- (void)play:(NSData *)pcmData;

@end
